﻿using Newtonsoft.Json;
using System.Collections.Generic;


namespace TImSdk
{
    /// <summary>
    ///  消息
    /// </summary>
    public class Message
    {
        /// <summary>
        /// 消息内元素列表
        /// </summary>
        [JsonProperty("message_elem_array")]
        public List<Elem> Message_Elem_Array { get; set; }
        /// <summary>
        /// 消息所属会话ID
        /// </summary>
        [JsonProperty("message_conv_id")]
        public string Message_Conv_Id { get; set; }
        /// <summary>
        /// 消息所属会话类型
        /// </summary>
        [JsonProperty("message_conv_type")]
        public TIMConvType Message_Conv_Type { get; set; }
        /// <summary>
        /// 消息的发送者
        /// </summary>
        [JsonProperty("message_sender")]
        public string Message_Sender { get; set; }
        /// <summary>
        ///  消息优先级
        /// </summary>
        [JsonProperty("message_priority")]
        public TIMMsgPriority Message_Priority { get; set; }
        /// <summary>
        ///  客户端时间
        /// </summary>
        [JsonProperty("message_client_time")]
        public long Message_Client_Time { get; set; }
        /// <summary>
        /// 服务端时间
        /// </summary>
        [JsonProperty("message_server_time")]
        public long Message_Server_Time { get; set; }
        /// <summary>
        /// 消息是否来自自己
        /// </summary>
        [JsonProperty("message_is_from_self")]
        public bool Message_Is_From_Self { get; set; }
        /// <summary>
        /// 消息是否已读
        /// </summary>
        [JsonProperty("message_is_read")]
        public bool Message_Is_Read { get; set; }
        /// <summary>
        ///  消息是否是在线消息，默认为false表示普通消息,true表示阅后即焚消息
        /// </summary>
        [JsonProperty("message_is_online_msg")]
        public bool Message_Is_Online_Msg { get; set; }
        /// <summary>
        /// 消息是否被会话对方已读
        /// </summary>
        [JsonProperty("message_is_peer_read")]
        public bool Message_Is_Peer_Read { get; set; }
        /// <summary>
        /// 读写(选填), 消息当前状态
        /// </summary>
        [JsonProperty("message_status")]
        public TIMMsgStatus Message_Status { get; set; }
        /// <summary>
        /// 消息的唯一标识
        /// </summary>
        [JsonProperty("message_unique_id")]
        public long Message_Unique_Id { get; set; }
        /// <summary>
        /// 消息的随机码
        /// </summary>
        [JsonProperty("message_rand")]
        public string Message_Rand { get; set; }
        /// <summary>
        /// 消息序列
        /// </summary>
        [JsonProperty("message_seq")]
        public string Message_Seq { get; set; }
        /// <summary>
        /// 自定义整数值字段
        /// </summary>
        [JsonProperty("message_custom_int")]
        public string Message_Custom_Int { get; set; }
        /// <summary>
        /// 自定义数据字段
        /// </summary>
        [JsonProperty("message_custom_str")]
        public string Message_Custom_Str { get; set; }
        /// <summary>
        /// 消息的发送者的用户资料
        /// </summary>
        [JsonProperty("message_sender_profile")]
        public UserProfile Message_Sender_Profile { get; set; }
        /// <summary>
        /// 读写(选填), 消息发送者在群里面的信息，只有在群会话有效。
        /// 目前仅能获取字段 kTIMGroupMemberInfoIdentifier、
        /// kTIMGroupMemberInfoNameCard 其他的字段建议通过 TIMGroupGetMemberInfoList 接口获取
        /// </summary>
        [JsonProperty("message_sender_group_member_info")]
        public GroupMemberInfo Message_Sender_Group_Member_Info { get; set; }
        /// <summary>
        /// 读写(选填), 消息的离线推送设置
        /// </summary>
        [JsonProperty("message_offlie_push_config")]
        public OfflinePushConfig Message_Offlie_Push_Config { get; set; }

    }
}